package com.chatsimple.netty.task

import com.chatsimple.netty.ServerReadHandler
import com.ly.data.MessageProtobuf
import io.netty.channel.Channel

interface ITaskHandler {

    /**
     * 处理任务数据
     */
    fun handle(channel: Channel, task: MessageProtobuf.TaskProto)

    /**
     * 某个客户端销毁
     */
    fun destroy(channel: Channel?)

    /**
     * 客户端连接集合
     */
    val clients get() = ServerReadHandler.clientContainer
}